Fluent Assertions Documentation
FluentAssertions.Primitives Namespace / ReferenceTypeAssertions<TSubject,TAssertions> Class / NotBeAssignableTo Method / NotBeAssignableTo<T>(String,Object[]) Method
The type to which the object should not be assignable to.
A formatted phrase as is supported by System.String.Format(System.String,System.Object[]) explaining why the assertion is needed. If the phrase does not start with the word because, it is prepended automatically.
Zero or more objects to format using the placeholders in because.
In This Topic
    NotBeAssignableTo<T>(String,Object[]) Method
    In This Topic
    Asserts that the object is not assignable to a variable of type T.
    Syntax
    public AndConstraint<TAssertions> NotBeAssignableTo<T>( 
       string because,
       params object[] becauseArgs
    )

    Parameters

    because
    A formatted phrase as is supported by System.String.Format(System.String,System.Object[]) explaining why the assertion is needed. If the phrase does not start with the word because, it is prepended automatically.
    becauseArgs
    Zero or more objects to format using the placeholders in because.

    Type Parameters

    T
    The type to which the object should not be assignable to.

    Return Value

    An FluentAssertions.AndConstraint<TParent> which can be used to chain assertions.
    Exceptions
    ExceptionDescription
    because
    Contracts
    Contract KindConditionException
    !MISSING PHRASE 'CONTRACT_I'!
    because
     
    Permissions
    PermissionDescription
    because
    Example
    because
    Supported Frameworks
    because
    See Also